import request from "@/utils/request";
import { downloadNew } from "@/utils/request";

//business
export function getBusinessList(param) {
  return request({
    url: "/car/admin/dealer/pageData",
    method: "post",
    data: param,
    headers: { "Content-Type": "application/json" },
  });
}
export function updateBussinessStatus(id,flag) {
  return request({
    url: "/car/admin/dealer/updateDealerStatus?id="+id+"&status="+flag,
    method: "post",
    headers: { "Content-Type": "application/json" },
  });
}
export function editBusiness(param) {
  return request({
    url: "car/admin/dealer/editDealer",
    method: "post",
    data:param,
    headers: { "Content-Type": "application/json" },
  });
}

//Appraiser
export function getAppraiserList(param) {
  return request({
    url: "/car/admin/appraiser/pageData",
    method: "post",
    data: param,
    headers: { "Content-Type": "application/json" },
  });
}
export function updateDealerStatus(id,flag) {
  return request({
    url: "/car/admin/appraiser/updateDealerStatus?id="+id+"&status="+flag,
    method: "post",
    headers: { "Content-Type": "application/json" },
  });
}
export function editDealer(param) {
  return request({
    url: "car/admin/appraiser/editDealer",
    method: "post",
    data:param,
    headers: { "Content-Type": "application/json" },
  });
}

//refund
export function getApplyRefund(param) {
  return request({
    url: "/car/admin/dealer/applyRefund/pageData",
    method: "post",
    data: param,
    headers: { "Content-Type": "application/json" },
  });
}
export function applyRefund(id,type) {
  return request({
    url: "/car/admin/dealer/applyRefund/deal?applyId="+id+"&type="+type ,
    method: "post",
    headers: { "Content-Type": "application/json" },
  });
}

//auctionMoney
export function getAuctionMoney(param) {
  return request({
    url: "/car/admin/dealer/auctionMoneyPageData",
    method: "post",
    data: param,
    headers: { "Content-Type": "application/json" },
  });
}